/*

Author   : chaos

FileName : stl_map.cpp

Date     : 17/08/17 11:08:34

*/
#include <iostream>
#include <string>
#include <iterator>
#include <map>
using namespace std;


int main(int argc ,char *argv[])
{
    typedef map < string ,string, less<string> > map_type;

    map_type m;
    map_type::iterator iter;

    m.insert(map_type::value_type("John","A senior high school student."));
    m.insert(map_type::value_type("Mary","A senior high school teacher"));
    m.insert(map_type::value_type("Bill","A junior high school student."));

    for(iter = m.begin(); iter != m.end(); iter++)
        cout << (*iter).first << ", " << (*iter).second << endl;

    return 0;
}
